#pragma once

class PostprocessMgr
{
public:
	PostprocessMgr();
	~PostprocessMgr();

	void		InitPostprocessMgr();

	void		SetDeferredShading(bool b);
	bool		DeferredShadingEnabled() const;

	void		SetSunLight(bool b, const glm::vec4* dir = NULL, const glm::vec4* col = NULL);
	bool		SunLightEnabled() const;

	void		SetFog(bool b, const float* minDist = NULL, const float* maxDist = NULL);
	bool		FogEnabled() const;

	void		SetMaterial();
	void		SetDSMaterial();
private:
	void		RebuildShader();
	RMaterial*	m_ppmaterial;
	RMaterial*	m_dsmaterial;

	bool		m_deferredShadingEnabled;
	bool		m_sunLightEnabled;
	bool		m_fogEnabled;

	bool		m_shaderNeedsRebuild;

	glm::vec4*									m_sunLight_Direction;
	glm::vec4*									m_sunLight_Color;
	
	float*										m_fogMinDist;
	float*										m_fogMaxDist;

	glm::vec4*									m_common4;
	glm::vec4*									m_common5;
	glm::vec4*									m_common6;
	glm::vec4*									m_common7;
};

